#ifndef COMMTITLEBASE_H
#define COMMTITLEBASE_H

#include <QWidget>
#include "titleWidget.h"

class CommTitleBase : public QWidget
{
    Q_OBJECT

public:
    CommTitleBase(QWidget *parent = 0);
    ~CommTitleBase();
    void setTitle(QString title, int size = 9);

private:
    void initTitleBar();
    void paintEvent(QPaintEvent *event);
    void loadStyleSheet(const QString &sheetName);

private slots:
    void onButtonMinClicked();
    void onButtonRestoreClicked();
    void onButtonMaxClicked();
    void onButtonCloseClicked();

protected:
    TitleWidget* m_titleBar;
};

#endif // COMMTITLEBASE_H
